<?php


namespace app\admin\validate;


use think\Validate;

class Admin extends Validate
{
    protected $rule = [
        'user_name' => 'require|max:25|unique:admin',
        'mobile' => 'mobile|unique:admin',
        'email' => 'email|unique:admin',
    ];

    protected $message = [
        'user_name.require' => '用户名不能为空',
        'user_name.unique' => '用户名已存在',
        'name.max' => '用户名最多不能超过25个字符',
        'mobile.mobile' => '手机号格式有误',
        'mobile.unique' => '手机号已存在',
        'email.email' => '邮箱格式有误',
        'email.unique' => '邮箱已存在',
    ];

    protected $scene = [

    ];
}